<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>指尖上行</title>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="stylesheet" href="../../css/css.css">
<link rel="stylesheet" href="../../css/PowerLevelingOrder.css">
<link rel="stylesheet" href="../../../bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css">
<link rel="stylesheet" href="../../../bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="../../../bower_components/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="../../../bower_components/Ionicons/css/ionicons.min.css">
<link rel="stylesheet" href="../../../dist/css/AdminLTE.min.css">
<link rel="stylesheet" href="../../../dist/css/skins/_all-skins.min.css">
<link rel="stylesheet" href="../../../bower_components/jvectormap/jquery-jvectormap.css">
<link rel="stylesheet" href="../../../bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css">
<link rel="stylesheet" href="../../../bower_components/bootstrap-daterangepicker/daterangepicker.css">
<link rel="stylesheet" href="../../../plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>
<body class="hold-transition skin-blue sidebar-mini"  data-treeview="3" data-treeview-menu="1">
<div class="wrapper">
  <header class="main-header"> <a class="logo"> <span class="logo-mini"><b>指</b></span> <span class="logo-lg"><img src="../../img/logo.png"/></span></a>
    <nav class="navbar navbar-static-top"><a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button"></a></nav>
  </header>
  <aside class="main-sidebar">
    <section class="sidebar">
      <ul class="sidebar-menu" data-widget="tree">
      </ul>
    </section>
  </aside>
  <div class="content-wrapper">
    <section class="content-search">
      <div class="form-group">
        <label>代练名称</label>
        <input type="text" class="form-control w140" placeholder="代练名称" id="leveling_name">
      </div>
      <div class="form-group">
        <label>代练类型</label>
        <select class="form-control w140" id="leveling_type">
          <option value="0">全部</option>
          <option value="1">个人</option>
          <option value="2">工作室</option>
        </select>
      </div>
      <div class="form-group">
        <label>订单号</label>
        <input type="text" class="form-control w140" placeholder="订单号" id="order_id">
      </div>
      <div class="form-group">
        <label>用户账号</label>
        <input type="text" class="form-control w140" placeholder="用户账号" id="user_name">
      </div>
      <div class="form-group">
        <label>用户ID</label>
        <input type="text" class="form-control w140" placeholder="用户ID" id="user_id">
      </div>
      <div class="form-group">
        <label>时间</label>
        <div class="input-group date w140 fl">
          <div class="input-group-addon"> <i class="fa fa-calendar"></i> </div>
          <input type="text" class="form-control pull-right" id="datepicker">
        </div>
        <span>到</span>
        <div class="input-group date w140 fl">
          <div class="input-group-addon"> <i class="fa fa-calendar"></i> </div>
          <input type="text" class="form-control pull-right" id="datepicker2">
        </div>
      </div>
      <div class="form-group">
        <label>代练账号</label>
        <input type="text" class="form-control w140" placeholder="代练账号" id="leveling_account">
      </div>
      <div class="form-group">
        <label>代练ID</label>
        <input type="text" class="form-control w140" placeholder="用户ID" id="le_id">
      </div>
      <div class="form-group">
        <button type="button" class="btn btn-primary btnsearch">搜索</button>
      </div>
    </section>
    <!-- 取消订单 -->
    <div class="modal fade" id="modal-cancel" style="display: none;">
      <div class="modal-dialog w400">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span></button>
            <h4 class="modal-title">取消订单</h4>
          </div>
          <div class="modal-body">确认取消订单吗？</div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btncancel">确认</button>
          </div>
        </div>
      </div>
    </div>
    <!-- 同意退款 -->
    <div class="modal fade" id="modal-agree" style="display: none;">
      <div class="modal-dialog w400">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span></button>
            <h4 class="modal-title">同意退款</h4>
          </div>
          <div class="modal-body">
            <h4>订单总额：100</h4>
            <input type="text" class="form-control w180" placeholder="请输入退款金额" id="return_price">
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btnagree">确认</button>
          </div>
        </div>
      </div>
    </div>
    <!-- 拒绝退款 -->
    <div class="modal fade" id="modal-Refuse" style="display: none;">
      <div class="modal-dialog w400">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span></button>
            <h4 class="modal-title">拒绝退款</h4>
          </div>
          <div class="modal-body">
            <h4>拒绝理由</h4>
            <input type="text" class="form-control w250" placeholder="请输入拒绝理由" id="msg">
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btnRefuse">确认</button>
          </div>
        </div>
      </div>
    </div>
    <!-- 查看退款理由 -->
    <div class="modal fade" id="modal-view" style="display: none;">
      <div class="modal-dialog w600">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span></button>
            <h4 class="modal-title">退款理由</h4>
          </div>
          <div class="modal-body">
            <h4>申诉原因</h4>
            <textarea class="form-control" rows="2" disabled id="complain_type"></textarea>
            <h4>相关证明截图</h4>
            <div class="imgdiv"></div>
            <h4>补充原因</h4>
            <textarea class="form-control" rows="5" disabled id="complain_info"></textarea>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">取消</button>
          </div>
        </div>
      </div>
    </div>
    <section class="content">
      <div class="box">
        <div class="box-header">
          <h3 class="box-title">代练订单列表</h3>
        </div>
        <div class="box-body">
          <table id="example1" class="table table-bordered table-striped">
          </table>
          <div class="paginationDiv">
            <ul class="pagination">
              <li class="prev"><a>上一页</a></li>
              <li class="next"><a>下一页</a></li>
            </ul>
            <input type="text" value="1" class="form-control curpage"/>
            <button type="button" class="btn btn-default gopage">跳转</button>
            <span class="pageinfo"></span> </div>
        </div>
      </div>
    </section>
  </div>
</div>
<script type="text/html" id="datalist">
	<thead>
	  <tr role="row">
		<th>订单号</th>
		<th>代练ID</th>
		<th>代练名称</th>
		<th>代练账号</th>
		<th>用户ID</th>
		<th>用户账号</th>
		<th>服务项目</th>
		<th>订单预定时间</th>
		<th>局数</th>
		<th>订单金额</th>
		<th>订单状态</th>
		<th>设置</th>
	  </tr>
    </thead>
	<tbody>
	<%for(var i = 0,len= dataset.length;i < len;i++){%>
	  <tr role="row">
		<td><%= dataset[i].order_id%></td>
		<td><%= dataset[i].leveling!=null?dataset[i].leveling.id:"-"%></td>
		<td><%= dataset[i].leveling!=null?dataset[i].leveling.levelingName:"-"%></td>
		<td><%= dataset[i].leveling!=null?dataset[i].levelingPhone:"-"%></td>
		<td><%= dataset[i].user_id%></td>
		<td><%= dataset[i].user_phone%></td>
		<td><%= dataset[i].service_item%></td>
		<td><%= dataset[i].create_date%></td>
		<td><%= dataset[i].game_number%></td>
		<td><%= dataset[i].order_price%></td>
		<td><%= dataset[i].order_status%></td>
		<td>
		<%if(dataset[i].order_status=="等待客服仲裁"){%>
		<button type="button" class="btn btn-info btn-xs view" data-toggle="modal" data-target="#modal-view" data-id="<%= dataset[i].id%>">查看退款理由</button>
		<button type="button" class="btn btn-info btn-xs agree" data-toggle="modal" data-target="#modal-agree" data-id="<%= dataset[i].id%>" data-price="<%= dataset[i].order_price%>">同意退款</button>
		<button type="button" class="btn btn-info btn-xs Refuse" data-toggle="modal" data-target="#modal-Refuse" data-id="<%= dataset[i].id%>">拒接退款</button>
		<%}else{%>
		   -
		<%}%>
		</td>
      </tr>
	<%}%>
    </tbody>
</script> 
<script src="../../../bower_components/jquery/dist/jquery.min.js"></script> 
<script src="../../../bower_components/jquery-ui/jquery-ui.min.js"></script> 
<script src="../../../bower_components/bootstrap/dist/js/bootstrap.min.js"></script> 
<script src="../../../bower_components/raphael/raphael.min.js"></script> 
<script src="../../../bower_components/jquery-sparkline/dist/jquery.sparkline.min.js"></script> 
<script src="../../../plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script> 
<script src="../../../plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script> 
<script src="../../../bower_components/jquery-knob/dist/jquery.knob.min.js"></script> 
<script src="../../../bower_components/moment/min/moment.min.js"></script> 
<script src="../../../bower_components/bootstrap-daterangepicker/daterangepicker.js"></script> 
<script src="../../../bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js"></script> 
<script src="../../../bower_components/bootstrap-datepicker/dist/locales/bootstrap-datepicker.zh-CN.min.js"></script> 
<script src="../../../plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script> 
<script src="../../../bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script> 
<script src="../../../bower_components/fastclick/lib/fastclick.js"></script> 
<script src="../../../dist/js/adminlte.min.js"></script> 
<script src="../../js/template-web.js"></script> 
<script src="../../js/requestOrigin.js"></script>
<script src="../../js/js.js"></script>
<script src="../../js/PowerLevelingOrder.js"></script> 
<script>
  $(function () {
	$('#datepicker').datepicker({format:"yyyy-mm-dd",language:"zh-CN",autoclose: true,todayHighlight:true});
	$('#datepicker2').datepicker({format:"yyyy-mm-dd",language:"zh-CN",autoclose: true,todayHighlight:true});
  })
</script>
</body>
</html>
